<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ page import="java.util.List"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="net.sf.json.JSONObject"%>
<%@ page import="com.houdoudou.bean.*"%>

<%  String basePath= request.getContextPath();%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>普通程序员</title>


<script type="text/javascript">
 function checkUser(){
   var secret1 = document.getElementById("secret1").value;
   var secret2 = document.getElementById("secret2").value;

   if(secret2!=secret1  ){
     alert("两次输入不一样");
     return false;
   }
   if(secret2 == ""  ){
    alert("密码不能为空");
     return false;
   }
  document.getElementById("form_updateProgrammer").submit();
}
 </script>
 

</head>
<body >
 <%@ include file="normalProgrammerHeader.jsp" %>
 <div style="background-color: white;">
<h2>修改程序员</h2>
  <form id="form_updateProgrammer"  action="<%=basePath%>/programmerServletJsp" >
    <input  type="hidden" name="affair" value="updateProgrammer" /><br/>
  电话：  <input  type="text" readonly="readonly" name="telnum" value="${programmer.telnum}"/><br/><br/>
         新密码第一次： <input type="password" id="secret1" name="secret" style="width: 100pt;"/><br/><br/>
        新密码第二次：  <input type="password" id="secret2" name="secret" style="width: 100pt;"/> <br/>
     <%  if( session.getAttribute("loginedType")!=null){
     int type= (Integer)session.getAttribute("loginedType");
      if(type==1)  {%> 
         类型：<input  type="radio" name="type" value="2"  <%if("${programmer.type}".equals("2")) out.print("checked");%>>普通程序员  <input  type="radio" name="type" value="1" <%if("${programmer.type}".equals("1")) out.print("checked");%>>超级程序员</br>   
         <% } }%>
    <input type="button" value="修改"  onclick = "checkUser();" > <br/>
    </form>  
   <br/> 
   <br/> 
   <br/> 
   </div>
</body>

</html>
<script> 
//取出传回来的参数error并与yes比较
  var errorInfo ='<%=request.getParameter("errorInfo")%>';
  if(errorInfo!='null'){
   alert(errorInfo);}
  
</script>